package gspushmq.v1.app.subscribeapp.models;

import static gspushmq.v1.app.subscribeapp.config.Config.DEFAULT_DEVICE_TYPE;
import static gspushmq.v1.app.subscribeapp.config.Config.DEFAULT_EXPIRE_TIME;
import static gspushmq.v1.app.subscribeapp.config.Config.DEFAULT_PUSH_TYPE;
import static gspushmq.v1.app.subscribeapp.config.Config.DEFAULT_STORE_Off_LINE;

import java.io.Serializable;
import java.util.Date;


/**
 * @Description 基础消息对象
 * @Author chengsj
 * @Date 2018/9/14 9:42
 * @Version 1.0
 * @company 上海朝阳永续信息技术有限公司
 * @copyright (c) 2015 SunTime Co'Ltd Inc. All rights reserved.
 **/
public class Message implements Serializable {
    Long appKey;
    String target; //推送目标: DEVICE:按设备推送 ALIAS : 按别名推送 ACCOUNT:按帐号推送  TAG:按标签推送; ALL: 广播推送
    String targetValue; ////根据Target来设定，如Target=DEVICE, 则对应的值为 设备id1,设备id2. 多个值使用逗号分隔.(帐号与设备有一次最多100个的限制)
    String title;
    String body;
    String pushType = DEFAULT_PUSH_TYPE; // 消息类型 MESSAGE NOTICE
    String deviceType = DEFAULT_DEVICE_TYPE; // 设备类型 ANDROID iOS ALL.
    Date pushDate = new Date();// 推送时间，不设置就是即可推送
    Long expireTime = DEFAULT_EXPIRE_TIME; //消息保存时间，单位时间戳毫秒
    Boolean storeOffline = DEFAULT_STORE_Off_LINE; //在消息有效时间内，是否要重发消息给刚刚上线的用户，这个配合expireTime使用
    String extParameters = ""; // 拓展参数

    public String getExtParameters() {
        return extParameters;
    }

    public void setExtParameters(String extParameters) {
        this.extParameters = extParameters;
    }

    public Long getAppKey() {
        return appKey;
    }

    public void setAppKey(Long appKey) {
        this.appKey = appKey;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public String getTargetValue() {
        return targetValue;
    }

    public void setTargetValue(String targetValue) {
        this.targetValue = targetValue;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getPushType() {
        return pushType;
    }

    public void setPushType(String pushType) {
        this.pushType = pushType;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public Date getPushDate() {
        return pushDate;
    }

    public void setPushDate(Date pushDate) {
        this.pushDate = pushDate;
    }

    public Long getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Long expireTime) {
        this.expireTime = expireTime;
    }

    public Boolean getStoreOffline() {
        return storeOffline;
    }

    public void setStoreOffline(Boolean storeOffline) {
        this.storeOffline = storeOffline;
    }
}
